﻿using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using IcecreamView;
using Framework.Audio;

public class ViewAudioModule : IC_AbstractModule
{
    public string OpenAudio = "audio01";

    public string CloseAudio = "audio02";


    public override void OnOpenView(Dictionary<string,IC_ViewData> parameters)
    {
        if (!string.IsNullOrEmpty(OpenAudio))
        {
            AudioManager.Instance.PlaySound(OpenAudio);
        }
    }

    public override void OnCloseView()
    {
        if (!string.IsNullOrEmpty(CloseAudio))
        {
            AudioManager.Instance.PlaySound(CloseAudio);
        }
    }

}